/*
 *  game.cpp
 */

#include <string>
#include <vector>
#include "campaign.h"
#include "game.h"
#include "player.h"

Game::Game(int gameID, Campaign& campaign, std::string name, Player* owner)
          :players(), campaign(campaign) {
    this->gameID = gameID;
    this->name = name,
    this->owner = owner;
    players.push_back(owner);
    active = false;
}

Game::~Game() {}

int Game::getID() {
    return gameID;
}

Campaign& Game::getCampaign() {
    return campaign;
}

std::string Game::getName() {
    return name;
}

Player* Game::getOwner() {
    return owner;
}

std::vector<Player*>* Game::getPlayers() {
    return &players;
}

void Game::addPlayer(Player* player) {
    players.push_back(player);
}

void Game::activate() {
    active = true;
}

bool Game::isActive() {
    return active;
}

//{+}

